package org.netty.push.api.dto;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(description = "消息推送响应")
public class BatchPushResponse  implements Serializable{

	private static final long serialVersionUID = -8668894976404891766L;

	/**
	 * 消息批次Id
	 */
	@ApiModelProperty(value="消息Id")
	private String requestId;
	@ApiModelProperty(value="接口请求标识")
	private Boolean success;
	@ApiModelProperty(value="消息处理状态吗")
	private String code;
	@ApiModelProperty(value="错误描述信息")
	private String errormsg;
	@ApiModelProperty(value="发送失败的设备号")
	private List<String> deviceTokens;
	
	private BatchPushResponse(String requestId, Boolean success, String code, String errormsg,List<String> deviceTokens) {
		super();
		this.requestId = requestId;
		this.success = success;
		this.code = code;
		this.errormsg = errormsg;
		this.deviceTokens=deviceTokens;
	}

	public static BatchPushResponse buildError( String code, String errormsg) {
		return new BatchPushResponse(null,false,code,errormsg,null);
	}

	public static BatchPushResponse buildSuccess(String messageId,List<String> deviceTokens) {
		return new BatchPushResponse(messageId,true,null,null,null);
	}

	public String getCode() {
		return code;
	}


	public void setCode(String code) {
		this.code = code;
	}


	public String getErrormsg() {
		return errormsg;
	}


	public void setErrormsg(String errormsg) {
		this.errormsg = errormsg;
	}

	
	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public String getRequestId() {
		return requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public List<String> getDeviceTokens() {
		return deviceTokens;
	}

	public void setDeviceTokens(List<String> deviceTokens) {
		this.deviceTokens = deviceTokens;
	}


	
}
